package com.kaibo.redis.queue.controller;

import com.kaibo.redis.queue.message.MessageProduct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;

/**
 * @author: kaibo
 * @date: 2021/1/9 18:57
 * @GitHub: https://github.com/yuxuelian
 * @qq: 568966289
 * @description:
 */


@RestController
@RequestMapping("/")
public class MessageTestController {

    @Autowired
    MessageProduct messageProduct;

    @PostMapping("send-message")
    @ResponseStatus(HttpStatus.NO_CONTENT)
    public void sendTest(@RequestPart("message") String message) {
        messageProduct.sendMessage(message);
    }


}
